package com.youlai.boot.modules.merchant.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.youlai.boot.modules.merchant.model.Merchant;
import com.youlai.boot.modules.merchant.model.MerchantVO;
import com.youlai.boot.modules.merchant.model.MerchantPageQuery;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface MerchantMapper extends BaseMapper<Merchant> {

    IPage<MerchantVO> getMerchantPage(Page<MerchantVO> page, @Param("query") MerchantPageQuery query);

    /**
     * 通过品牌ID查询关联的商户分页列表
     */
    IPage<MerchantVO> getMerchantPageByBrandId(Page<MerchantVO> page, @Param("brandId") Long brandId,
            @Param("query") MerchantPageQuery query);
}
